﻿@using Stamp_For_Africa_Version_2.Models
@using Stamp_For_Africa_Version_2.ViewModels
@model ManageStampViewModel

@{
    ViewBag.Title = "Assign Stamp To Catalogue";
}

<h2></h2>
<div class="roundedpanel">
<h2>Catalogues this stamp is already assigned to</h2>
@{
	foreach (var assignedCatalogue in Model.AssignedCatalogues)
	{
		<p>@assignedCatalogue.Catalogue.CatalogName : @assignedCatalogue.CatalogueNumber | @Html.ActionLink("Remove assignment", "RemoveCatalogueAssignment", new { catalogueEntryId = assignedCatalogue.Id, stampId = assignedCatalogue.StampId })</p>		}
}
</div>

<div class="roundedpanel">
<h2>Assign this stamp to another catalogue</h2>
@using (Html.BeginForm())
{
  @Html.HiddenFor(model => Model.StampId)
   <div class="editor-label">
    @Html.Label("Catalogue number")
  </div>
  <div class="editor-field">
    @Html.EditorFor(model => Model.CatalogueNumber, Model.CatalogueNumber)
  </div> 
  
  <div class="editor-label">
    @Html.Label("Catalogue")
  </div>
  <div class="editor-field">


    @Html.DropDownListFor(model => Model.SelectedCatalogueId, Model.AvailableCatalogues)
  </div>
  <button type="submit" value="Update">Assign</button>
}
</div>
  
